package com.sz.biz.logistics.ord.entity;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Package: com.sz.biz.logistics.ord.entity<br>
 * Function: 订单物流下单和受理信息，code和ord_order_status_code的201和202对应
 * Author: yanhong.xiao.<br>
 * Date: 2017-05-17 16:20:00.
 */
public enum OrderTrackStatus implements IEnum {
    COMMITED("201", "下单成功，等待系统确认"),
    ACCEPT("202", "已成功受理，通知收货");
    private String code;
    private String name;

    OrderTrackStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static OrderTrackStatus valueOfEnum(String code) {
        OrderTrackStatus[] iss = values();
        for (OrderTrackStatus cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
